import request from "../utils/request.js";
export const getCourseListApi =()=>{
    return request({
        url:"/course/",
        method: "get",
    })
}
export const getCourseNameApi =(search)=>{
    return request({
        url:`/course`,
        method: "get",
        params:{
            search
        }
    })
}
export const updateCourseApi =({course_id,course_name,create_user})=>{
    return request({
        url:`/course/${course_id}`,
        method: "put",
        data:{
            course_name,
            create_user
        }
    })
}
export const deleteCourseApi =(course_id)=>{
    return request({
        url:`/course/${course_id}`,
        method: "delete",
    })
}
export const addCourseApi =({course_id,course_name,create_user})=>{
    return request({
        url:"/course/",
        method: "post",
        data:{
            course_id,
            course_name,
            create_user
        }
    })
}